#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	while (cin >> n) {
		if (n <= 0) { // 题目给 n  == 0
			break;
		}
		int a = 0, b = 0, c = 0;
		double temp;
		for (int i = 1; i <= n; i++) {
			cin >> temp;
			if (temp < 0) {
				a++;
			} else if (temp == 0) {
				b++;
			} else {
				c++;
			}
		}
		cout << a << " " << b << " " << c;
	}
	return 0;
}
